home *** CD-ROM | disk | FTP | other *** search
/ IRIX Patches 1995 June / SGI IRIX Patches 1995 Jun.iso / 5.3_patches / patchSG0000154 / patchSG0000154.idb / usr / include / GL / glu.h.z / glu.h
Encoding:
C/C++ Source or Header  |  1995-06-12  |  8.6 KB  |  230 lines

  1. #ifndef __glu_h__
  2. #define __glu_h__
  3.  
  4. #include <GL/gl.h>
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. /*
  11. ** Copyright 1991-1993, Silicon Graphics, Inc.
  12. ** All Rights Reserved.
  13. ** 
  14. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  15. ** the contents of this file may not be disclosed to third parties, copied or
  16. ** duplicated in any form, in whole or in part, without the prior written
  17. ** permission of Silicon Graphics, Inc.
  18. ** 
  19. ** RESTRICTED RIGHTS LEGEND:
  20. ** Use, duplication or disclosure by the Government is subject to restrictions
  21. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  22. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  23. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  24. ** rights reserved under the Copyright Laws of the United States.
  25. */
  26.  
  27. /*
  28. ** Return the error string associated with a particular error code.
  29. ** This will return 0 for an invalid error code.
  30. */
  31. extern const GLubyte* gluErrorString (GLenum errorCode);
  32.  
  33. extern const GLubyte* gluGetString (GLenum name);
  34.  
  35. extern void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
  36. extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
  37. extern void gluPickMatrix (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4]);
  38. extern void gluLookAt (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz);
  39. extern int gluProject (GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz);
  40. extern int gluUnProject (GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz);
  41.  
  42. extern int gluScaleImage (GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout);
  43.  
  44. extern int gluBuild1DMipmaps (GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data);
  45. extern int gluBuild2DMipmaps (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data);
  46.  
  47. typedef struct GLUquadricObj GLUquadricObj;
  48. extern GLUquadricObj* gluNewQuadric (void);
  49. extern void gluDeleteQuadric (GLUquadricObj *state);
  50. extern void gluQuadricNormals (GLUquadricObj *quadObject, GLenum normals);
  51. extern void gluQuadricTexture (GLUquadricObj *quadObject, GLboolean textureCoords);
  52. extern void gluQuadricOrientation (GLUquadricObj *quadObject, GLenum orientation);
  53. extern void gluQuadricDrawStyle (GLUquadricObj *quadObject, GLenum drawStyle);
  54. extern void gluCylinder (GLUquadricObj *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks);
  55. extern void gluDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops);
  56. extern void gluPartialDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle);
  57. extern void gluSphere (GLUquadricObj *qobj, GLdouble radius, GLint slices, GLint stacks);
  58. extern void gluQuadricCallback (GLUquadricObj *qobj, GLenum which, void (*fn)());
  59.  
  60. typedef struct GLUtriangulatorObj GLUtriangulatorObj;
  61. extern GLUtriangulatorObj* gluNewTess (void);
  62. extern void gluTessCallback (GLUtriangulatorObj *tobj, GLenum which, void (*fn)());
  63. extern void gluDeleteTess (GLUtriangulatorObj *tobj);
  64. extern void gluBeginPolygon (GLUtriangulatorObj *tobj);
  65. extern void gluEndPolygon (GLUtriangulatorObj *tobj);
  66. extern void gluNextContour (GLUtriangulatorObj *tobj, GLenum type);
  67. extern void gluTessVertex (GLUtriangulatorObj *tobj, GLdouble v[3], void *data);
  68.  
  69. #ifdef __cplusplus
  70.     class GLUnurbsObj;
  71. #else 
  72.     typedef struct GLUnurbsObj GLUnurbsObj;
  73. #endif
  74. extern GLUnurbsObj* gluNewNurbsRenderer (void);
  75. extern void gluDeleteNurbsRenderer (GLUnurbsObj *nobj);
  76. extern void gluBeginSurface (GLUnurbsObj *nobj);
  77. extern void gluBeginCurve (GLUnurbsObj *nobj);
  78. extern void gluEndCurve (GLUnurbsObj *nobj);
  79. extern void gluEndSurface (GLUnurbsObj *nobj);
  80. extern void gluBeginTrim (GLUnurbsObj *nobj);
  81. extern void gluEndTrim (GLUnurbsObj *nobj);
  82. extern void gluPwlCurve (GLUnurbsObj *nobj, GLint count, GLfloat *array, GLint stride, GLenum type);
  83. extern void gluNurbsCurve (GLUnurbsObj *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type);
  84. extern void gluNurbsSurface (GLUnurbsObj *nobj, GLint sknot_count, GLfloat *sknot, GLint tknot_count, GLfloat *tknot, GLint s_stride, GLint t_stride, GLfloat *ctlarray, GLint sorder, GLint torder, GLenum type);
  85. extern void gluLoadSamplingMatrices (GLUnurbsObj *nobj, const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4]);        
  86. extern void gluNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat value);
  87. extern void gluGetNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat *value);
  88. extern void gluNurbsCallback (GLUnurbsObj *nobj, GLenum which, void (*fn)());
  89.  
  90.  
  91. /****        Generic constants         ****/
  92.  
  93. #define GLU_VERSION_1_1            1
  94.  
  95. /* Errors: (return value 0 = no error) */
  96. #define GLU_INVALID_ENUM        100900
  97. #define GLU_INVALID_VALUE        100901
  98. #define GLU_OUT_OF_MEMORY        100902
  99. #define GLU_INCOMPATIBLE_GL_VERSION    100903
  100.  
  101. /* gets */
  102. #define GLU_VERSION         100800
  103. #define GLU_EXTENSIONS        100801
  104.  
  105. /* For laughs: */
  106. #define GLU_TRUE        GL_TRUE
  107. #define GLU_FALSE        GL_FALSE
  108.  
  109.  
  110. /****         Quadric constants         ****/
  111.  
  112. /* Types of normals: */
  113. #define GLU_SMOOTH        100000
  114. #define GLU_FLAT        100001
  115. #define GLU_NONE        100002
  116.  
  117. /* DrawStyle types: */
  118. #define GLU_POINT        100010
  119. #define GLU_LINE        100011
  120. #define GLU_FILL        100012
  121. #define GLU_SILHOUETTE        100013
  122.  
  123. /* Orientation types: */
  124. #define GLU_OUTSIDE        100020
  125. #define GLU_INSIDE        100021
  126.  
  127. /* Callback types: */
  128. /*      GLU_ERROR        100103 */
  129.  
  130.  
  131. /****         Tesselation constants         ****/
  132.  
  133. /* Callback types: */
  134. #define GLU_BEGIN         100100        /* void (*)(GLenum)    */
  135. #define GLU_VERTEX        100101        /* void (*)(void *)    */
  136. #define GLU_END            100102        /* void (*)(void)    */
  137. #define GLU_ERROR        100103        /* void (*)(GLint)    */
  138. #define GLU_EDGE_FLAG        100104        /* void (*)(GLboolean)    */
  139.  
  140. /* Contours types: */
  141. #define GLU_CW            100120
  142. #define GLU_CCW            100121
  143. #define GLU_INTERIOR        100122
  144. #define GLU_EXTERIOR        100123
  145. #define GLU_UNKNOWN        100124
  146.  
  147. #define GLU_TESS_ERROR1        100151
  148. #define GLU_TESS_ERROR2        100152
  149. #define GLU_TESS_ERROR3        100153
  150. #define GLU_TESS_ERROR4        100154
  151. #define GLU_TESS_ERROR5        100155
  152. #define GLU_TESS_ERROR6        100156
  153. #define GLU_TESS_ERROR7        100157
  154. #define GLU_TESS_ERROR8        100158
  155.  
  156.  
  157. /****        NURBS constants            ****/
  158.  
  159. /* Properties: */
  160. #define GLU_AUTO_LOAD_MATRIX        100200
  161. #define GLU_CULLING            100201
  162. #define GLU_SAMPLING_TOLERANCE        100203
  163. #define GLU_DISPLAY_MODE        100204
  164. #define GLU_PARAMETRIC_TOLERANCE    100202
  165. #define GLU_SAMPLING_METHOD        100205
  166. #define GLU_U_STEP            100206
  167. #define    GLU_V_STEP            100207
  168.  
  169. /* Sampling methods: */
  170. #define    GLU_PATH_LENGTH            100215
  171. #define GLU_PARAMETRIC_ERROR        100216
  172. #define GLU_DOMAIN_DISTANCE        100217
  173.  
  174. /* Trimming curve types */
  175. #define GLU_MAP1_TRIM_2        100210
  176. #define GLU_MAP1_TRIM_3        100211
  177.  
  178. /* Display modes: */
  179. /*      GLU_FILL         100012 */
  180. #define GLU_OUTLINE_POLYGON    100240
  181. #define GLU_OUTLINE_PATCH    100241
  182.  
  183. /* Callbacks: */
  184. /*      GLU_ERROR        100103 */
  185.  
  186. /* Errors: */
  187. #define GLU_NURBS_ERROR1    100251
  188. #define GLU_NURBS_ERROR2    100252
  189. #define GLU_NURBS_ERROR3    100253
  190. #define GLU_NURBS_ERROR4    100254
  191. #define GLU_NURBS_ERROR5    100255
  192. #define GLU_NURBS_ERROR6    100256
  193. #define GLU_NURBS_ERROR7    100257
  194. #define GLU_NURBS_ERROR8    100258
  195. #define GLU_NURBS_ERROR9    100259
  196. #define GLU_NURBS_ERROR10    100260
  197. #define GLU_NURBS_ERROR11    100261
  198. #define GLU_NURBS_ERROR12    100262
  199. #define GLU_NURBS_ERROR13    100263
  200. #define GLU_NURBS_ERROR14    100264
  201. #define GLU_NURBS_ERROR15    100265
  202. #define GLU_NURBS_ERROR16    100266
  203. #define GLU_NURBS_ERROR17    100267
  204. #define GLU_NURBS_ERROR18    100268
  205. #define GLU_NURBS_ERROR19    100269
  206. #define GLU_NURBS_ERROR20    100270
  207. #define GLU_NURBS_ERROR21    100271
  208. #define GLU_NURBS_ERROR22    100272
  209. #define GLU_NURBS_ERROR23    100273
  210. #define GLU_NURBS_ERROR24    100274
  211. #define GLU_NURBS_ERROR25    100275
  212. #define GLU_NURBS_ERROR26    100276
  213. #define GLU_NURBS_ERROR27    100277
  214. #define GLU_NURBS_ERROR28    100278
  215. #define GLU_NURBS_ERROR29    100279
  216. #define GLU_NURBS_ERROR30    100280
  217. #define GLU_NURBS_ERROR31    100281
  218. #define GLU_NURBS_ERROR32    100282
  219. #define GLU_NURBS_ERROR33    100283
  220. #define GLU_NURBS_ERROR34    100284
  221. #define GLU_NURBS_ERROR35    100285
  222. #define GLU_NURBS_ERROR36    100286
  223. #define GLU_NURBS_ERROR37    100287
  224.  
  225. #ifdef __cplusplus
  226. }
  227. #endif
  228.  
  229. #endif /* __glu_h__ */
  230.